package com.neusoft.bizcore.activiti.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractAuditModel;
import com.neusoft.bizcore.web.jpa.model.Comment;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
@Entity
@org.hibernate.annotations.Table(appliesTo = "wf_system_serial_number", comment = "工作流工单号表")
@Table(name = "wf_system_serial_number")
public class ActSerialNumber extends AbstractAuditModel {

    private static final long serialVersionUID = 1L;

    /** 模块名称 */
    @NotBlank(message = "模块名称不能为空")
    @Length(max = 255, message = "模块名称不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '模块名称'")
    private String moduleName;

    /** 模块编码 */
    @NotBlank(message = "模块编码不能为空")
    @Length(max = 255, message = "模块编码不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '模块编码'")
    private String moduleCode;

    /** 流水号配置模板 */
    @NotBlank(message = "流水号配置模板不能为空")
    @Length(max = 255, message = "流水号配置模板不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '流水号配置模板'")
    private String configTemplet;

    /** 序列号最大值 */
    @Column(length = 10, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '序列号最大值'")
    private String maxSerial;

    /** 是否自动增长标示 */
    @Column(length = 10, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '是否自动增长标示'")
    private String isAutoIncrement;

    /** 预生成流水号数量 */
    @Column(length = 10, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '预生成流水号数量'")
    private String preMaxNum;
}
